#ifndef __RTFRAMEWORK__
#define __RTFRAMEWORK__

class RTWindowApplication;
class RTRenderer;
class RTCamera;
class RTTimer;

//!	RTFramework Class.
/*!
*	@brief	
*
*	@author	(C)Kwon Seonghyuk 2012
*/
class RTFramework
{
protected :
	RTWindowApplication*	m_pRTApp;
	RTRenderer*				m_pRTRenderer;
	RTCamera*				m_pRTCamera;
	RTTimer*				m_pRTTimer;
	DWORD					m_dwClearColor;

public :
	RTFramework();
	virtual ~RTFramework();

	static RTFramework*		CreateFramework();
	BOOL					Initialize(
		TCHAR* pszWindowCaption,
		UINT nWindowWidth,
		UINT nWindowHeight,
		BOOL bWindowed,
		DWORD dwWindowStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX );
	BOOL					CreateRenderer();
	void					Run();

public :
	virtual void			GameInit() = 0;

protected :
	virtual void			Update( const double elapsedTime );
	virtual void			Render( const double elapsedTime );
	virtual void			Restore();
	virtual void			Release();

public :
	RTWindowApplication*	GetRTWinApp();
	void					SetClearColor( DWORD dwColor );

public :
	static LRESULT CALLBACK	WinProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
};

#endif